#!/bin/bash

# postinst script for locale-sv
#
# see: dh_installdeb(1)

#set -e

# summary of how this script can be called:
#        * <postinst> \`configure' <most-recently-configured-version>
#        * <old-postinst> \`abort-upgrade' <new version>
#        * <conflictor's-postinst> \`abort-remove' \`in-favour' <package>
#          <new-version>
#        * <postinst> \`abort-remove'
#        * <deconfigured's-postinst> \`abort-deconfigure' \`in-favour'
#          <failed-install-package> <version> \`removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

PATH=/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

if [ "${BASEDIR:=/}" = "/" ]; then
    BASEDIR=""
else
    BASEDIR_OPT="-b $BASEDIR"
fi

case "$1" in
    configure)
        chown root:bin $BASEDIR/usr/lib
	chown root:bin $BASEDIR/usr/lib/locale
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_COLLATE
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_CTYPE
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_MESSAGES
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_MONETARY
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_NUMERIC
	chown root:bin $BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_TIME
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_COLLATE
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_CTYPE
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_MESSAGES
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_MONETARY
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_NUMERIC
	chown root:bin $BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_TIME
	chown root:sys $BASEDIR/usr
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_COLLATE/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_COLLATE/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_CTYPE/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_CTYPE/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_MESSAGES/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_MESSAGES/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_MONETARY/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_MONETARY/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_NUMERIC/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_NUMERIC/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_TIME/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_FI.UTF-8/LC_TIME/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_COLLATE/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_COLLATE/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_CTYPE/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_CTYPE/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_MESSAGES/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_MESSAGES/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_MONETARY/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_MONETARY/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_NUMERIC/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_NUMERIC/LCL_DATA"
	chmod 0444 "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_TIME/LCL_DATA"
	chown root:bin "$BASEDIR/usr/lib/locale/sv_SE.UTF-8/LC_TIME/LCL_DATA"
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument '$1'" >&2
        exit 1
    ;;
esac



# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

